package cpgears {
	import cpgears.movie.IMovie;
	import cpgears.properties.WidgetPropertiesBase;
	import cpgears.views.DummyRuntimeView;
	import cpgears.views.DummyView;
	import cpgears.views.manager.SimpleViewManager;
	/**
	 * ...
	 * @author Whyves
	 */
	public class BaseImplMock extends WidgetBase{
		
		private var mCallback:Function = null;
		
		public function BaseImplMock(callback:Function, propertiesObject:WidgetPropertiesBase = null) {
			super(propertiesObject, new SimpleViewManager(new DummyView("edit"), new DummyRuntimeView("runtime"), new DummyView("stage"), new DummyView("preview")));
			mCallback = callback;
		}
		
		override protected function preview(properties:Object):void {
			mCallback.call(null, "showPreview", properties);
		}
		
		override protected function editProperties(properties:Object):void {
			mCallback.call(null, "enterEdit", properties);
		}

		override protected function prepareStage(properties:Object):Boolean {
			mCallback.call(null, "enterStage", properties);
			return true;
		}
		
		override protected function enterRuntime(properties:Object, movie:IMovie):void {
			mCallback.call(null, "enterRuntime", properties, movie);
		}
	}

}